}
out:
+ g_clear_object (&self->priv->online_cancellable);
g_clear_error (&error);
g_object_unref (self);
}
}
+static void
+cancel_and_clear_cancellable (GtkAppChooserDialog *self)
+{
+ if (self->priv->online_cancellable != NULL)
+ {
+ g_cancellable_cancel (self->priv->online_cancellable);
+ g_clear_object (&self->priv->online_cancellable);
+ }
+}
+
static void
gtk_app_chooser_dialog_response (GtkDialog *dialog,
gint response_id,
break;
case GTK_RESPONSE_CANCEL:
case GTK_RESPONSE_DELETE_EVENT:
+ cancel_and_clear_cancellable (self);
self->priv->dismissed = TRUE;
default :
break;
GtkAppChooserDialog *self = GTK_APP_CHOOSER_DIALOG (object);
g_clear_object (&self->priv->gfile);
+ cancel_and_clear_cancellable (self);
g_clear_object (&self->priv->online);
- if (self->priv->online_cancellable != NULL)
- {
- g_cancellable_cancel (self->priv->online_cancellable);
- g_clear_object (&self->priv->online_cancellable);
- }
-
G_OBJECT_CLASS (gtk_app_chooser_dialog_parent_class)->dispose (object);
}